package com.icangya.service.impl;

import com.icangya.DAO.IDomainDAO;
import com.icangya.domain.DomainDO;
import com.icangya.service.IDomainService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("DomainServiceImpl")
public class DomainServiceImpl implements IDomainService {

    @Autowired
    private IDomainDAO iDomainDAO;


    @Override
    public List<DomainDO> getDoamin() throws Exception {

        return iDomainDAO.getDomain();
    }

    @Override
    public void updateDoamin(DomainDO domainDO) throws Exception {
        iDomainDAO.update(domainDO);
    }

    @Override
    public void saveDomain(DomainDO domainDO) throws Exception {
            iDomainDAO.save(domainDO);
    }

    @Override
    public List<DomainDO> selectDomains() throws Exception {
        List<DomainDO> domainDOList = iDomainDAO.selectDomains();
        return domainDOList;
    }
}
